package com.ardf.mapper;

import com.ardf.entity.Rule;
import com.ardf.entity.dto.DownloadRuleDto;
import com.ardf.entity.dto.RuleTableDto;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ShiYunHao
 * @since 2025-01-06
 */
public interface RuleMapper extends BaseMapper<Rule> {

    //分页
    Page<RuleTableDto> searchAll(Page<RuleTableDto> page, @Param("competitionId") Long competitionId,
                                 @Param("projectId") Long projectId);

    /**
     * 导出规则表
     * @param competitionId
     * @return
     */
    List<DownloadRuleDto> getAll(@Param("competitionId") Long competitionId);
}
